package com.tudouji.project.bill.mapper;

import com.tudouji.project.bill.domain.Sellform;
import com.tudouji.project.bill.domain.SellformOld;
import com.tudouji.project.bill.domain.Whoutform;
import com.tudouji.project.bill.domain.vo.SellformListRep;
import com.tudouji.project.bill.domain.vo.SellformRep;

import java.util.List;

/**
 * 销售订单Mapper接口
 *
 * @author wf
 * @date 2021-01-13
 */
public interface SellformMapper
{
    /**
     * 查询销售订单
     *
     * @return 销售订单
     */
    public Sellform selectSellformById(Long id);

    public Sellform selectSellformByGuid(String guid);

    /**
     * 根据编码查询
     *
     * @param sellcode
     * @return
     */
    public Sellform selectSellformByCode(String sellcode);
    public Sellform selectSellformRejectByCode(Sellform sellform);

    /**
     * 查询销售订单列表
     *
     * @param sellform 销售订单
     * @return 销售订单集合
     */
    public List<Sellform> selectSellformList(Sellform sellform);
    public List<SellformListRep> pagePCList(Sellform sellform);
    public SellformListRep pagePCListSum(Sellform sellform);

    /**
     * 新增销售订单
     *
     * @param sellform 销售订单
     * @return 结果
     */
    public int insertSellform(Sellform sellform);

    /**
     * 修改销售订单
     *
     * @param sellform 销售订单
     * @return 结果
     */
    public int updateSellform(Sellform sellform);

    /**
     * 删除销售订单
     *
     * @param guid 销售订单ID
     * @return 结果
     */
    public int deleteSellformById(String guid);

    /**
     * 批量删除销售订单
     *
     * @param guids 需要删除的数据ID
     * @return 结果
     */
    public int deleteSellformByIds(String[] guids);

    public List<SellformRep> findRpt(SellformRep entity);

    public Sellform findDetail(Sellform entity);

    List<Sellform> findTransferForms(Sellform sf);

    public Integer findChiledCount(String guid);

    String selectProductTypesByItems(String guid);

    List<Sellform> selectSellformsByDepAndRoom(Sellform sellform);

    List<Sellform> selectSellformsByUser(Sellform sellform);

    List<Sellform> selectSellformPendingList(Sellform sellform);

    SellformOld selectSellformOldByGuid(String guid);

    public Sellform selectBaseSellformById(Long id);

    List<Sellform> countSellOut(String guid);

    List<Sellform> countSellSuitOut(String guid);

    List<Sellform> countOut(Sellform order);

    List<Sellform> countSuitOut(Sellform order);

    List<Sellform> countNoOut(Sellform order);

    List<Sellform> countSuitNoOut(Sellform order);

    Integer selectInnerPriceFlag(String guid);

    Integer selectInnerPriceFlagByItems(Sellform order);

    List<Sellform> selectOverDueSellform(String createtime);

    List<Whoutform> getWhoutformAll(String orderGuid);
}
